<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
//引入DB库
use Illuminate\Support\Facades\DB;
class Scenic extends Model
{
	protected $table = 'admin_scenic';
    //查询方法
    public function test_query($table,$where)
    {
    	$users = DB::table($table)->where($where)->first();
    	$obj_arr=json_decode(json_encode($users),true);
    	return $obj_arr;
    }
    /**
    * 查询景区
    */
    public function getAll()
    {
       return DB::table($this->table)->get();
    }
}
